package com.dataart.training.crimequalification.service;

import com.dataart.training.crimequalification.dao.CrimeSubjectDAO;
import com.dataart.training.crimequalification.entity.CrimeSubjectEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class CrimeSubjectServiceImpl implements CrimeSubjectService {

    //---------------------------------------------------------------

    @Autowired
    private CrimeSubjectDAO crimeSubjectDAO;

    //---------------------------------------------------------------

    @Override
    public List<CrimeSubjectEntity> getAllCrimeSubjects() {
        return crimeSubjectDAO.getAllCrimeSubjects();
    }

    @Override
    public CrimeSubjectEntity getCrimeSubjectByCodename(String codename) {
        return crimeSubjectDAO.getCrimeSubjectByCodename(codename);
    }
}
